<?php

CLASS printe
{
    private static $obj=null;
    private function_construct()
{}
public static function getInstance(){
        if(is_null(self::$obj)){
            self::$obj=new Printer();
        }
        return self::$obj;
     }
 }

$p1=printer::getInstance();
$p2=printer::getInstance();
var_dump(DB::getObj());
var_dump(DB::getObj());

?>